package com.yeung.primary;

import java.util.List;

public class Person {
    public int id;
    public String name;
    public int age;
    public Car car;
    public List<Book> books;
    public Address address;

    public Person(int id, String name, int age, Car car, List<Book> books, Address address) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.car = car;
        this.books = books;
        this.address = address;
    }

    public Person() {
    }

    public Person(int id, String name, int age, Car car) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.car = car;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Car getCar() {
        return car;
    }

    public void setCar(Car car) {
        this.car = car;
    }

    public List<Book> getBooks() {
        return books;
    }

    public void setBooks(List<Book> books) {
        this.books = books;
    }

    @Override
    public String toString() {
        return "Person{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", car=" + car +
                ", books=" + books +
                ", address=" + address +
                '}';
    }
}
